package com.app.fooddb.service;

import com.app.fooddb.dao.UsersMapper;
import com.app.fooddb.pojo.Foods;
import com.app.fooddb.pojo.Users;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class UsersServiceImpl implements UsersService{
    @Resource
    public UsersMapper usersMapper;
    @Override
    public Users login(String telephone, String password) {
        return usersMapper.login(telephone,password);
    }

    @Override
    public int register(Users users) {
        return usersMapper.register(users);
    }

    @Override
    public List<Foods> list() {
        return usersMapper.list();
    }

    @Override
    public Foods findById(Integer id) {
        return usersMapper.findById(id);
    }
}
